package com.kjc.demo.basic.designermodel.observer;

import java.util.ArrayList;
import java.util.List;

public abstract class PullSubject {
	
	protected List<PullObserver> list = new ArrayList<PullObserver>();
	
	protected void add(PullObserver observer) {
		list.add(observer);
		
	}

	protected void delete(PullObserver observer) {
		list.remove(observer);
		
	}

	protected void notifyAllO() {
		for(PullObserver o : list) {
			o.update(this);
		}
		
	}
}
